package com.app.base.service.system.controller;


import com.app.base.service.system.service.TemplateInfoService;
import com.app.base.utlis.auth.JwtHelper;
import com.app.base.utlis.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * 模板表 前端控制器
 * @author yuhag
 * @since 2022-05-16
 */
@RestController
@RequestMapping("/templateInfoController")
@Api(tags = "系统设置")
public class TemplateInfoController {


    @Resource
    private TemplateInfoService templateService;

    @ApiOperation("获取当前公司的模板信息列表")
    @GetMapping("getTemplate")
    public Result getTemplate(HttpServletRequest request){
        String userId = JwtHelper.getMemberIdByJwtToken(request);
        return templateService.getTemplateList(userId);
    }


}

